{% load i18n xadmin_tags %}


{% block navbar_md %}
  <ul class="sidebar-menu">
    <li class="header">功能导航</li>
    <li>
      <a class="jumpto" class="section" href="{% if head_fix %}#!{% endif %}{% url 'xadmin:index' %}"><i class="icon fa-fw fa fa-home"></i> <span>我的面板</span></a>
    </li>
    {% for item in nav_menu %}
    {% ifequal item.key '_default_group' %}
          {% for sitem in item.menus %}
          <li{% if sitem.selected %} class="active"{% endif %}>
            {% if sitem.url %}<a class="jumpto" href="{% if head_fix %}#!{% endif %}{{ sitem.url }}">{% endif %}
            {% if sitem.icon %}<i class="fa fa-fw {{sitem.icon}}"></i>{%else%}<i class=""></i>{% endif %}
            {{ sitem.title }}</span>{% if sitem.url %}</a>{% endif %}
          </li>
          {% endfor %}
    {% else %}
      <li class="treeview {% if item.selected %} active{% endif %}">
        <a href="#" class="section">
          {% if item.icon %}<i class="fa fa-fw {{item.icon}}"></i>
          {% elif item.first_icon %}<i class="fa fa-fw {{item.first_icon}}"></i>
          {%else%}<i class="fa fa-fw fa-circle-o"></i>{% endif %}
          <span>{{item.title}}</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
        </a>
        <ul class="treeview-menu">
          {% for sitem in item.menus %}
          <li{% if sitem.selected %} class="active"{% endif %}>
            {% if sitem.url %}<a class="jumpto" href="{% if head_fix %}#!{% endif %}{{ sitem.url }}">{% endif %}
            {% if sitem.icon %}<i class="fa fa-fw {{sitem.icon}}"></i>{%else%}<i class=""></i>{% endif %}
            {{ sitem.title }}</span>{% if sitem.url %}</a>{% endif %}
          </li>
          {% endfor %}
        </ul>
      </li>
    {% endifequal %}
    {% endfor %}
    {% view_block 'menu-nav' %}
  </ul>
{% endblock navbar_md %}


